<form style="border: solid 1px #000000;" align="center" action = "linestops" method = "post" >
	
	<h2>Find line busstops</h2>
	
	<p>
		Select line: <br/>
			<select name="lines">
				<option value="">Choose a line:</option>
				<?php
					while($row = $this->line->fetch()){
					echo "<option value='{$row['id']}'>{$row['name']}</option>";
					}
				?>
			</select>
	</p>
	<p>
		<input name = "submit" type = "submit" value = "Find"></input>
	</p>
</form>

<?php if ($this->linestops): ?>
<table>
	<tr>
		<th>Name</th>
		<th>Latitude</th>
		<th>Longitude</th>
	</tr>
	<?php while ($row = $this->linestops->fetch()): ?>
	<tr>
		<td><?php echo $row['name']; ?></td>
		<td><?php echo $row['latitude']; ?></td>
		<td><?php echo $row['longitude']; ?></td>
	</tr>
	<?php endwhile; ?>
</table>
<?php endif; ?>	